<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateLoginLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('login_log', function (Blueprint $table) {
            $table->increments('id');
            $table->integer("user_id")->comment("用户ID");
            $table->string("mobile",20)->nullable()->comment("手机号");
            $table->string("openid",50)->nullable()->comment("openid");
            $table->string("ip",20)->comment("IP地址");
            $table->dateTime("login_date")->comment("登录时间");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('login_log');
    }
}
